<template>
  <div class="home">
    <el-container>
      <el-aside width="200px">
        <el-menu
        default-active="/user"
        :default-openeds="['/']"
        class="el-menu-vertical-demo"
        @open="handleOpen"
        @close="handleClose"
        background-color="rgb(38,65,85)"
        text-color="#fff"
        active-text-color="rgb(0,143,202)"
        router>
           <el-menu-item index="/about">
             <i class="el-icon-setting"></i>
             <span slot="title">首页</span>
           </el-menu-item>
           <el-submenu index="/">
            <template slot="title">
              <i class="el-icon-location"></i>
              <span>数据管理</span>
            </template>
            <el-menu-item index="/user">用户列表</el-menu-item>
            <el-menu-item index="/store">商品列表</el-menu-item>
            <el-menu-item index="2-3">选项1</el-menu-item>
            <el-menu-item index="2-4">选项2</el-menu-item>
          </el-submenu>
          <el-submenu index="3">
            <template slot="title">
              <i class="el-icon-location"></i>
              <span>数据管理</span>
            </template>
            <el-menu-item index="1-1">用户列表</el-menu-item>
            <el-menu-item index="1-2">商品列表</el-menu-item>
            <el-menu-item index="1-3">选项1</el-menu-item>
            <el-menu-item index="1-4">选项2</el-menu-item>
          </el-submenu>
          <el-submenu index="4">
            <template slot="title">
              <i class="el-icon-location"></i>
              <span>数据管理</span>
            </template>
            <el-menu-item index="1-1">用户列表</el-menu-item>
            <el-menu-item index="1-2">商品列表</el-menu-item>
            <el-menu-item index="1-3">选项1</el-menu-item>
            <el-menu-item index="1-4">选项2</el-menu-item>
          </el-submenu>
          <el-submenu index="5">
            <template slot="title">
              <i class="el-icon-location"></i>
              <span>数据管理</span>
            </template>
            <el-menu-item index="1-1">用户列表</el-menu-item>
            <el-menu-item index="1-2">商品列表</el-menu-item>
            <el-menu-item index="1-3">选项1</el-menu-item>
            <el-menu-item index="1-4">选项2</el-menu-item>
          </el-submenu>
        </el-menu>
      </el-aside>
      <el-container>
        <el-header>Header</el-header>
        <el-main>
          <router-view/>
        </el-main>
      </el-container>
    </el-container>
  </div>
</template>

<script>
// @ is an alias to /src


export default {
  name: 'Home',
  components: {
    
  },
  data(){
    return{
     
    }
  },
  methods:{
    handleOpen(key, keyPath) {
      console.log(key, keyPath);
    },
    handleClose(key, keyPath) {
      console.log(key, keyPath);
    }
  }
}
</script>

<style scoped>
  .el-header {
    background-color: #B3C0D1;
    color: #333;
    height: 20vh;
  }
  
  .el-aside {
    background-color: #D3DCE6;
    color: #333;
    height: 100vh;
    background-color: rgb(38,65,85);
  }
  
  .el-main {
    background-color: #E9EEF3;
    color: #333;
  }
  
  
  
</style>
